import request from '@/utils/request'
import { data } from 'jquery'

// 个人档案查询列表
export function getPersonArchive(data) {
  return request({
    url: 'es/es/api/communal/search?state=' + data.state,
    method: 'post',
    data: data
  })
}

// 公共档案列表
export function getPublicArchives(data) {
  return request({
    url: 'es/es/api/communal/search?state='+ data.state,
    method: 'post',
    data: data
  })
}

// 个人资料查询列表
export function getInfomation(query) {
  return request({
    url: 'archive/personal/library/list',
    method: 'get',
    params: query
  })
}

// 获取素材列表
export function sourceMaterialList(data) {
  return request({
    url: '/archive/specialSubjectContenr/sourceMaterialList',
    method: 'POST',
    data: data
  })
}

// 保存编辑
export function saveMaterial(data) {
  return request({
    url: '/archive/specialSubjectContenr',
    method: 'post',
    data: data
  })
}

// 获取详情
export function getDetail(id) {
  return request({
    url: '/archive/specialSubjectContenr/' + id,
    method: 'get'
  })
}

// 获取素材详情
export function getDetailList(query) {
  return request({
    url: '/archive/specialSubjectContenr/getSourceMaterialList',
    method: 'get',
    params: query
  })
}

// 转移至成果管理
export function transferCode(query) {
  console.log(data,"000000000000000000")
  return request({
    url: '/archive/specialSubjectContenr/achievement',
    method: 'GET',
    params:query
  })
}
